package com.stone.zeus.component.grpc.integration;

import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * @author fujianjian
 * @date 2023/3/21 16:56
 **/
@Slf4j
@Component
public class KafkaPerformanceLogListener {


    @KafkaListener(topics = "zeus-performance-log", containerFactory = "kafkaListenerContainerFactory")
    public void onPerformanceMessage(ConsumerRecord<String, String> consumerRecord) {
        log.info("key:{}, \t value:{}", consumerRecord.key(), consumerRecord.value());
    }

}
